import { IParam, EntityBase } from "@/core";
import { IAvueChildOne } from './interface/i-avue-child-one';
import AvueChildOneKeys from './avue-child-one-keys';

/**
 * avue示例实体01基类
 * 基于template/src/api/{{appEntities}}/{{appEntities}}-base.ts.hbs生成  
 *
 * @export
 * @abstract
 * @class AvueChildOneBase
 * @extends { EntityBase }
 * @implements { IAvueChildOne }
 */
export abstract class AvueChildOneBase extends EntityBase implements IAvueChildOne {
	/**
	 * 实体名称
	 *
	 * @readonly
	 * @type {string}
	 * @memberof AvueChildOneBase
	 */
	get srfdename(): string {
		return 'AVUECHILDONE';
	}

	/**
     * 当前实体所有属性
     *
     * @protected
     * @type {string[]}
     * @memberof AvueChildOneBase
     */
    protected get keys(): string[] {
        return AvueChildOneKeys;
    }

	/**
	 * Creates an instance of ConstactOppoBase.
	 * @param {*} [data]
	 * @memberof AvueChildOneBase
	 */
	constructor(data?: any) {
		super();
		this.setData(data);
	}

	/**
	 * 建立时间
	 **/
	createdate?: any;
	
	get srfmajortext(): string {
		return this.avuechildonename;
	}

	set srfmajortext(val: string) {
		this.avuechildonename = val;
	}
	/**
	 * avue示例实体01名称
	 **/
	avuechildonename?: any;
	
	/**
	 * 更新时间
	 **/
	updatedate?: any;
	
	get srfkey(): string {
		return this.avuechildoneid;
	}

	set srfkey(val: string) {
		this.avuechildoneid = val;
	}

	/**
	 * avue示例实体01标识
	 **/
	avuechildoneid?: any;
	
	/**
	 * 更新人
	 **/
	updateman?: any;
	
	/**
	 * 建立人
	 **/
	createman?: any;
	
	/**
	 * 组织部门标识
	 **/
	deptid?: any;
	
	/**
	 * avue测试标识
	 **/
	avuetestid?: any;
	
	/**
	 * avue测试名称
	 **/
	avuetestname?: any;
	

	/**
	 * 重置实体数据
	 *
	 * @param {IParam} [data={}]
	 * @memberof AvueChildOneBase
	 */
	reset(data: IParam = {}): void {
		super.reset(data);
		this.avuechildonename = data.avuechildonename || data.srfmajortext;
		this.avuechildoneid = data.avuechildoneid || data.srfkey;
	}
}